<template>
	<view>
		<view class="header-box">
			<view class="header-box-1"><text v-show="Number(incomeDetail.money) > 0">+</text>{{incomeDetail.money}}</view>
			<view class="header-box-2">专卖收益</view>
		</view>
		<view class="order-msg">
			<view class="order-msg-1">
				状态<text>发放成功</text>
			</view>
			<view class="order-msg-1">
				时间<text>{{getTime(incomeDetail.createtime)}}</text>
			</view>
			<view class="order-msg-1">
				交易号<text>{{incomeDetail.order_sn}}</text>
			</view>
			<view class="order-msg-1">
				备注<text>{{incomeDetail.memo}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				incomeDetail: {}
			}
		},
		methods: {

		},
		onLoad(options) {
			this.incomeDetail = JSON.parse(options.incomeDetail)
		},
		methods: {
			getTime(timestamp) {
				let date = new Date(parseInt(timestamp) * 1000);
				let Year = date.getFullYear();
				let Moth = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
				let Day = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
				let Hour = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
				let Minute = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
				let Sechond = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
				return Year + '-' + Moth + '-' + Day + '   ' + Hour + ':' + Minute + ':' + Sechond;
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #F6F7F9;
	}

	.header-box {
		width: 100%;
		height: 235rpx;
		background-color: #FFFFFF;
		padding-top: 100rpx;
		position: relative;

		.header-box-1 {
			font-weight: bold;
			font-size: 64rpx;
			color: #DD0403;
			text-align: center;

			text {
				font-size: 32rpx;
			}
		}

		.header-box-2 {
			font-weight: 500;
			font-size: 28rpx;
			color: #666666;
			text-align: center;
			margin-top: 20rpx;
		}
	}

	.order-msg {
		background: #FFFFFF;
		border-radius: 16px 16px 16px 16px;
		margin: 0 auto;
		margin-top: 20rpx;
		padding: 20rpx;

		.order-msg-1 {
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
			margin-top: 30rpx;

			text {
				color: #333333;
				margin-left: 30rpx;
			}
		}
	}
</style>